package com.galaxis.wms.query

import com.galaxis.wms.entity.BasLoginAgent
import com.querydsl.core.types.Path
import com.querydsl.core.types.PathMetadata
import com.querydsl.core.types.dsl.DateTimePath
import com.querydsl.core.types.dsl.NumberPath
import com.querydsl.core.types.dsl.StringPath
import com.querydsl.sql.ColumnMetadata
import com.querydsl.sql.RelationalPathBase

import java.sql.Timestamp
import java.sql.Types

import static com.querydsl.core.types.PathMetadataFactory.forVariable

/**
 * 登录(bas_login_agent)
 */
@SuppressWarnings("ALL")
class QBasLoginAgent extends RelationalPathBase<BasLoginAgent> {
    /** bas_login_agent表 */
    public static final QBasLoginAgent basLoginAgent = new QBasLoginAgent("bas_login_agent")

    /** 登录ID */
    public final NumberPath<Long> loginId = createNumber("loginId", Long.class)
    /** 用户ID */
    public final NumberPath<Long> userId = createNumber("userId", Long.class)
    /** 登录目标 */
    public final NumberPath<Integer> loginTarget = createNumber("loginTarget", Integer.class)
    /** 验证方式 */
    public final NumberPath<Integer> authType = createNumber("authType", Integer.class)
    /** 登录名 */
    public final StringPath loginName = createString("loginName")
    /** 登录密码 */
    public final StringPath loginPassword = createString("loginPassword")
    /** 是否启用 */
    public final NumberPath<Integer> isEnable = createNumber("isEnable", Integer.class)
    /** 创建者 */
    public final StringPath createBy = createString("createBy")
    /** 建立时间 */
    public final DateTimePath<Timestamp> createAt = createDateTime("createAt", Timestamp.class)
    /** 修改者 */
    public final StringPath updateBy = createString("updateBy")
    /** 更新时间 */
    public final DateTimePath<Timestamp> updateAt = createDateTime("updateAt", Timestamp.class)

    QBasLoginAgent(String variable) {
        super(BasLoginAgent.class, forVariable(variable), "public", "bas_login_agent")
        addMetadata()
    }

    QBasLoginAgent(String variable, String schema, String table) {
        super(BasLoginAgent.class, forVariable(variable), schema, table)
        addMetadata()
    }

    QBasLoginAgent(String variable, String schema) {
        super(BasLoginAgent.class, forVariable(variable), schema, "bas_login_agent")
        addMetadata()
    }

    QBasLoginAgent(Path<? extends BasLoginAgent> path) {
        super(path.getType(), path.getMetadata(), "public", "bas_login_agent")
        addMetadata()
    }

    QBasLoginAgent(PathMetadata metadata) {
        super(BasLoginAgent.class, metadata, "public", "bas_login_agent")
        addMetadata()
    }

    void addMetadata() {
        addMetadata(loginId, ColumnMetadata.named("login_id").withIndex(1).ofType(Types.BIGINT).withSize(64))
        addMetadata(userId, ColumnMetadata.named("user_id").withIndex(2).ofType(Types.BIGINT).withSize(64))
        addMetadata(loginTarget, ColumnMetadata.named("login_target").withIndex(3).ofType(Types.INTEGER).withSize(32))
        addMetadata(authType, ColumnMetadata.named("auth_type").withIndex(4).ofType(Types.INTEGER).withSize(32))
        addMetadata(loginName, ColumnMetadata.named("login_name").withIndex(5).ofType(Types.VARCHAR).withSize(255))
        addMetadata(loginPassword, ColumnMetadata.named("login_password").withIndex(6).ofType(Types.VARCHAR).withSize(255))
        addMetadata(isEnable, ColumnMetadata.named("is_enable").withIndex(7).ofType(Types.INTEGER).withSize(32))
        addMetadata(createBy, ColumnMetadata.named("create_by").withIndex(8).ofType(Types.VARCHAR).withSize(64))
        addMetadata(createAt, ColumnMetadata.named("create_at").withIndex(9).ofType(Types.TIMESTAMP).withSize(100))
        addMetadata(updateBy, ColumnMetadata.named("update_by").withIndex(10).ofType(Types.VARCHAR).withSize(64))
        addMetadata(updateAt, ColumnMetadata.named("update_at").withIndex(11).ofType(Types.TIMESTAMP).withSize(100))
    }
}
